1) Field of the Invention
The present invention relates to a device that controls writing on a nonvolatile memory and makes it possible to selectively use the nonvolatile memory as a ROM or a RAM. The nonvolatile memory is, for example a magnetic random access memory (MRAM), that allows fast random access.
2) Description of the Related Art
The MRAM is a semiconductor memory that has been newly developed. The MRAM is better in many aspects as compared to the other semiconductor memories. That is, the MRAM is better in nonvolatility, can be driven at lower voltage, does not cause destruction when reading-out, writing can be performed faster (for example, in 5 ns), and writing can be repeated more times (for example, more than 1015 times) Therefore, it may be effective to use the MRAM""s instead of the conventional read-only-memories (ROM""s) or the random-access-memories (RAM""s).
However, the MRAM""s can not be used instead of the ROM""s, because the there is a fear that the contents of the MRAM""s are easily over-written when there occurs runaway of a computer program or the like. Moreover, the MRAM""s cannot also be used instead of the RAM""s, because data remains in the MRAM""s even after power supply is switched and an ill minded person can easily still the data. Thus, the MRAM""s are less secure.
It is an object of this invention to provide a device that makes it possible to use a nonvolatile memory (e.g., the MRAM) as both, the ROM and the RAM.
According to the present invention, nonvolatile memory cells are arranged at crossing points of bit-lines and word-lines. A mode signal that indicates whether the nonvolatile memory cells are to be used as RAM or ROM is generated. When the mode signal indicates that the nonvolatile memory cells are used as RAM, current is allowed to flow through the bit-lines in one specific direction, current is allowed to flow through the word-lines and the direction of the current flowing through the word-lines is adjusted to write data in the nonvolatile memory cells. When the mode signal indicates that the nonvolatile memory cells are used as ROM no current is allowed to flow through the bit-lines or the word-lines so that data can not be written in the nonvolatile memory cells. A control unit controls supply of current to the bit-lines and the word-lines based on the mode signal.
These and other objects, features and advantages of the present invention are specifically set forth in or will become apparent from the following detailed descriptions of the invention when read in conjunction with the accompanying drawings.